home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 23 / AMIGAplus Sonderheft 23 (2000)(Falke)(DE)[!].iso / Updates / HD-Installer / FreneticHD / Install < prev    next >
Text File  |  1980-04-03  |  4KB  |  209 lines

  1. ;****************************
  2.  
  3. (set #readme-file "README") ;name of readme file
  4. (set #last-disk 2)          ;amount of disks
  5. (set #disk-size 901120)     ;size of each disk
  6.  
  7. ;****************************
  8. ;----------------------------
  9. ; Checks if given program is reachable via the path
  10. ; if not abort install
  11. ; IN:  #program - to check
  12. ; OUT: -
  13.  
  14. (procedure P_chkrun
  15.   (if
  16.     (= 0 (run ("cd SYS:\nWhich %s" #program)))
  17.     ("")
  18.     (abort ("You must install \"%s\" first !\nIt must be accessible via the path.\nYou can find it in the WHDLoad package." #program))
  19.   )
  20. )
  21.  
  22. ;----------------------------
  23. ; Create disk-Image using DIC
  24. ; IN:  #dest        - DestinationPath
  25. ;      #CI_diskname - DiskName
  26. ;      #CI_diskno   - DiskNumber
  27. ;      #CI_drive    - DriveToReadFrom
  28. ; OUT: -
  29.  
  30. (procedure P_image
  31.   (message ("\nInsert \"%s\" into drive %s !\n\n(make sure it's the right disk because it will not be checked)" #CI_diskname #CI_drive))
  32.   (if
  33.     (= 0
  34.       (run ("cd \"%s\"\nDIC %s FD=%ld LD=%ld SIZE=%ld >CON:///1000//CLOSE" #dest #CI_drive #CI_diskno #CI_diskno #disk-size))
  35.     )
  36.     (run ("FileNote %s Quiet" #CI_diskname))
  37.     (abort "\"DIC\" has failed to create a diskimage")
  38.   )
  39. )
  40.  
  41. ;****************************
  42.  
  43. (if
  44.   (exists #readme-file)
  45.   (if
  46.     (= 0 (run ("SYS:Utilities/Multiview %s" #readme-file)))
  47.     ("")
  48.     (run ("SYS:Utilities/More %s" #readme-file))
  49.   )
  50. )
  51.  
  52. (set #program "WHDLoad")
  53. (P_chkrun)
  54.  
  55. (set #program "DIC")
  56. (P_chkrun)
  57.  
  58. ; in expert mode ask for source drive
  59. (if
  60.   (= @user-level 2)
  61.   (
  62.     (set #CI_drive
  63.       (askchoice
  64.     (prompt "Select source drive for diskimages")
  65.     (default 0)
  66.     (choices "DF0:" "DF1:" "RAD:" "Enter Device")
  67.     (help @askchoice-help)
  68.       )
  69.     )
  70.     (select #CI_drive
  71.       (set #CI_drive "DF0:")
  72.       (set #CI_drive "DF1:")
  73.       (set #CI_drive "RAD:")
  74.       (set #CI_drive
  75.         (askstring
  76.           (prompt "Select source drive for diskimages")
  77.           (default "DF0:")
  78.           (help @askstring-help)
  79.         )
  80.       )
  81.     )
  82.   )
  83.   (set #CI_drive "DF0:")
  84. )
  85.  
  86. (set @default-dest
  87.   (askdir
  88.     (prompt ("Where should \"%s\" installed ?\nA drawer \"%s\" will automatically created." @app-name @app-name))
  89.     (help @askdir-help)
  90.     (default @default-dest)
  91.     (disk)
  92.   )
  93. )
  94. (set #dest (tackon @default-dest @app-name))
  95. (if
  96.   (exists #dest)
  97.   (
  98.     (set #choice
  99.       (askbool
  100.         (prompt ("\nDirectory \"%s\" already exists.\n Should it be deleted ?" #dest))
  101.         (default 1)
  102.         (choices "Delete" "Skip")
  103.         (help @askbool-help)
  104.       )
  105.     )
  106.     (if
  107.       (= #choice 1)
  108.       (run ("Delete \"%s\" \"%s.info\" All" #dest #dest))
  109.     )
  110.   )
  111. )
  112. (makedir #dest
  113.   (help @makedir-help)
  114.   (infos)
  115. )
  116.  
  117. ;----------------------------
  118.  
  119. (set #Game_Ver
  120.     (askchoice
  121.         (prompt "Which version of the loader do you wish to install")
  122.         (help    @askoptions-help)
  123.         (choices
  124.            "JST"
  125.            "WHDLoad"
  126.         )
  127.     )
  128. )
  129.  
  130. (if (= #Game_Ver 0)
  131.   (copyfiles
  132.     (help @copyfiles-help)
  133.     (source ("%sHD" @app-name))
  134.     (newname ("%s" @app-name ))
  135.     (dest #dest)
  136.   )
  137. )
  138. (if (= #Game_Ver 1)
  139.   (copyfiles
  140.     (help @copyfiles-help)
  141.     (source ("%s.Slave" @app-name))
  142.     (dest #dest)
  143.   )
  144. )
  145.  
  146. (if
  147.   (exists ("%s.newicon" @app-name))
  148.   (set #icon
  149.     (askchoice
  150.       (prompt "\nWhich icon do you like to install ?\n")
  151.       (default 0)
  152.       (choices "Normal" "RomIcon" "NewIcon")
  153.       (help @askchoice-help)
  154.     )
  155.   )
  156.   (set #icon 0)
  157. )
  158. (if (= #Game_Ver 0)
  159.   (select #icon
  160.     (set #icon ("%sJST.inf" @app-name))
  161.     (set #icon ("%sJST.romicon" @app-name))
  162.     (set #icon ("%sJST.newicon" @app-name))
  163.   )
  164. )
  165. (if (= #Game_Ver 1)
  166.   (select #icon
  167.     (set #icon ("%s.inf" @app-name))
  168.     (set #icon ("%s.romicon" @app-name))
  169.     (set #icon ("%s.newicon" @app-name))
  170.   )
  171. )
  172.  
  173. (copyfiles
  174.   (help @copyfiles-help)
  175.   (source #icon)
  176.   (newname ("%s.info" @app-name))
  177.   (dest #dest)
  178. )
  179. (if
  180.   (exists #readme-file)
  181.   (copyfiles
  182.     (help @copyfiles-help)
  183.     (source #readme-file)
  184.     (dest #dest)
  185.   )
  186. )
  187. (if
  188.   (exists ("%s.info" #readme-file))
  189.   (copyfiles
  190.     (help @copyfiles-help)
  191.     (source ("%s.info" #readme-file))
  192.     (dest #dest)
  193.   )
  194. )
  195.  
  196. (set #CI_diskno 1)
  197. (while
  198.   (<= #CI_diskno #last-disk)
  199.   (
  200.     (set #CI_diskname ("%s Disk %ld" @app-name #CI_diskno))
  201.     (P_image)
  202.     (set #CI_diskno (+ #CI_diskno 1))
  203.   )
  204. )
  205.  
  206. ;----------------------------
  207.  
  208. (exit)
  209.